namespace LS.Digitize
{
    public struct ReadDictionaryValueScope: IScope
    {
        public IReader Reader { get; private set; }
        public bool ReadFailure { get; private set; }
        public ReadDictionaryValueScope(IReader reader)
        {
            Reader = reader;
            ReadFailure = reader.StartReadDictionaryValue();
        }
        
        public void Dispose()
        {
            Reader.EndReadDictionaryValue();
            Reader = null;
        }
    }
}